home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM1.C next >
Text File  |  1991-03-13  |  2KB  |  56 lines

  1.    #include "window.h"
  2.    #define NORM   CREATE_VIDEO_ATTRIBUTE(black,white)  /* define video
  3.  
  4.                                                           attribute */
  5.    #define BLUEONBLACK  CREATE_VIDEO_ATTRIBUTE(black,blue)  /* define
  6.                                                            video attribute */
  7.    #define REDONBLACK   CREATE_VIDEO_ATTRIBUTE(black,red)
  8.    #define GREENONBLACK CREATE_VIDEO_ATTRIBUTE(black,green)
  9.  
  10.    main()
  11.    {
  12.      int i;
  13.      WPOINTER w1,w2,w3;             /* pointers to a window structures */
  14.      WindowInitializeSystem();     /* system initialization function */
  15.      WindowSaveInitial(0);
  16.      w1 = WindowInitialize(BORDER,          /* Window has a border */
  17.             1,               /* row on the screen to open window */
  18.             1,               /* column on screen to open window */
  19.             30,              /* width in characters of the window */
  20.             15,              /* height of characters in window */
  21.             BLUEONBLACK,     /* video attribute of text area of window */
  22.             NORM,            /* video attribute of border */
  23.             SINGLEBOX);      /* type of border to draw */
  24.  
  25.      /* define second window */
  26.      w2 = WindowInitialize(BORDER,3,3,30,15,REDONBLACK,NORM,DOUBLEBOX);
  27.  
  28.      /* define third window */
  29.  
  30.      w3 = WindowInitialize(BORDER,5,5,30,15,GREENONBLACK,NORM,SINGLEBOX);
  31.  
  32.      WindowOpen(w1);      /* make window 1 ok to write */
  33.  
  34.      WindowOpen(w2);      /* make window 2 ok to write */
  35.  
  36.      WindowOpen(w3);      /* make window 3 ok to write */
  37.  
  38.      WindowDisplay(w1,1,NOEFFECT);
  39.      WindowDisplay(w2,2,NOEFFECT);
  40.      WindowDisplay(w3,3,NOEFFECT);
  41.  
  42.      GET_KEY();
  43.  
  44.      WindowDisplay(w2,1,NOEFFECT);
  45.  
  46.      GET_KEY();
  47.  
  48.      WindowDisplay(w3,1,NOEFFECT);
  49.  
  50.      GET_KEY();
  51.  
  52.      WindowDisplay(w1,1,NOEFFECT);
  53.  
  54.      GET_KEY();
  55.    }
  56.